# makefile for Mine Mayhem v2.10.

CC	  = gcc-2953
CXX	  = $(CC)
CFLAGS	  = -Wall -mcpu=pentiumpro -O6 -fomit-frame-pointer -ffast-math -g
CXXFLAGS  = $(CFLAGS) -fno-rtti
LD	  = $(CC)
LDFLAGS   = -g
LOADLIBES = -ltws -lgr

OFILES = mine.o mainmenu.o \
	 minefld.o fieldsqr.o fieldhxr.o fieldhex.o board.o \
	 solver.o tree234.o malloc.o \
	 custom.o times.o options.o sound.o \
	 tiles.o tilessqr.o tileshex.o faces.o digits.o menuicon.o timesicn.o \
	 inifile.o spin.o msgwin.o radiogrp.o

all:	mine.exe palette.exe

mine.exe:	$(OFILES)
	$(LD) -o mine.exe $(OFILES) $(LDFLAGS) $(LOADLIBES)

palette.exe: palette.cc palette.h
	 $(CXX) $(CXXFLAGS) palette.cc -o palette.exe $(LOADLIBES)

mine.o:     mine.cc mainmenu.h minefld.h board.h times.h inifile.h \
	    tiles.h digits.h faces.h menuicon.h timesicn.h

mainmenu.o: mainmenu.cc mainmenu.h menuicon.h minefld.h options.h sound.h \
	    msgwin.h times.h

FIELD =     layout.h minefld.h board.h options.h tiles.h inifile.h

minefld.o:  minefld.cc	$(FIELD) custom.h times.h sound.h mainmenu.h
fieldsqr.o: fieldsqr.cc $(FIELD)
fieldhxr.o: fieldhxr.cc $(FIELD)
fieldhex.o: fieldhex.cc $(FIELD)
board.o:    board.cc board.h layout.h minefld.h times.h digits.h faces.h
solver.o:   solver.cc	$(FIELD)
tree234.o:  tree234.cc tree234.h puzzles.h
malloc.o:   malloc.cc puzzles.h
custom.o:   custom.cc custom.h spin.h layout.h minefld.h times.h
times.o:    times.cc times.h timesicn.h custom.h options.h layout.h minefld.h \
	    radiogrp.h
options.o:  options.cc options.h minefld.h times.h timesicn.h
sound.o:    sound.cc sound.h
tiles.o:    tiles.cc tiles.h
tilessqr.o: tilessqr.cc tiles.h
tileshex.o: tileshex.cc tiles.h
faces.o:    faces.cc faces.h
digits.o:   digits.cc digits.h
menuicon.o: menuicon.cc menuicon.h
timesicn.o: timesicn.cc timesicn.h
inifile.o:  inifile.cc inifile.h
spin.o:     spin.cc spin.h
msgwin.o:   msgwin.cc msgwin.h
radiogrp.o: radiogrp.cc radiogrp.h
